#ifndef LIDAR_SIM_CORE_H
#define LIDAR_SIM_CORE_H

#include "ros/ros.h"
#include <pcl/point_cloud.h>
#include "pcl_ros/transforms.h"
#include <pcl_conversions/pcl_conversions.h>
#include "sensor_msgs/PointCloud2.h"
#include "geometry_msgs/PointStamped.h"

#include "tf/tf.h"
#include "tf2_ros/buffer.h"
#include "tf2_ros/transform_listener.h"
#include "tf2_geometry_msgs/tf2_geometry_msgs.h"

#define __APP_NAME__ "lidar_sim"

class LidarSim{
    public:
        LidarSim();
        ~LidarSim();
        void run();

    private:
        ros::NodeHandle nh_;
        ros::NodeHandle private_nh_;
        tf2_ros::Buffer buffer;
        tf2_ros::TransformListener tf_listener;
    
    private:
        double x; 
        double y;
        double radius;
        std::string frame_id;
    
    private:
        std::string output_pc2_topic_;
    
    private:
        ros::Subscriber click_point_sub_; 
        ros::Publisher pointcloud2_pub_;
    
    private:
        void click_point_callback(const geometry_msgs::PointStamped::ConstPtr& msg);
        void process(const ros::TimerEvent& e);
};
#endif